package com.ml.mall.enums;

import com.ml.mall.exception.BaseErrorInfoInterface;

public enum CommonEnum implements BaseErrorInfoInterface {
	// 数据操作错误定义
	SUCCESS("200", "SUCCESS"),
	FAIL("400","FAIL"),
	SYSTEM_ERROR("500","SYSTEM_ERROR"),
	//收藏夹
	ICATAGORY_DEL_ERR("1009","Non existent favorites"),
	//优惠券
	COUPPON_ERROR("0901","Coupons cannot be used together or coupons have been used up!!"),

	//产品
	PRDUCT_STATE_ERROR("1012","The product status is off"),
	//库存
	SKUDATA_STOCK_ERROR("1014","Insufficient inventory"),

	INSERT_ERROR("1001","Add failed"),
	UPDATE_ERROR("1002","Modification failed"),
	DELETE_ERROR("1003","Deletion failed"),
	ILLEGAL_REQ_ERROR("1004","unlegal request"),
	ALREADY_EXIST_SAME("1005","Already exists, please do not repeat"),
	SELECT_ERROR("1006","No information found"),
	INSERT_MAX_ERROR("1007","Add limit reached"),
	REDIS_DELETE_ERROR("1008","The variant does not exist"),
	NO_EXISTS_USER("1009","user does not exist"),
	PASSWORD_ERROR("1010","Password input error"),
	LIMIT_NUM("1011","Recommended quantity exceeding limit!"),
	PRODUCT_NOT_EXISTS_OR_EXPIRED("1012","Product information does not exist or is not within the product release cycle"),
	MAIL_SEND_ERROR("4001012","Gagal menghantar emel"),
	TAX_MORE_THAN_ONE("1013", "The enabled tax rate cannot exceed 1"),
	UPDATE_PRODUCT_STATE_ERROR("1015","Only administrators can modify the current status"),
	NO_SUBSCRIPTION("1016", "No subscription related content"),
	ROLE_NAME_ALREADY_EXISTS("1017", "Role name already exists"),


	ALREADY_EXISTS_SAME_INVITCODE("2001","The invitation code already exists"),
	ALREADY_EXISTS_COMPANY_CREDIT("2002","The company's balance information already exists"),
	INVITE_CODE_INVALID("2003","Invalid registration code, please re-enter"),
	CHECK_IF_ACC_RIGHT("2004","Please check whether the account information to be added is correct"),
	CONNECT_WITH_COMPANY("2005","Please refer to related company information"),
	INTERESTED_INDUSTRY_IS_NULL("2006","Select at least one industry of interest"),
	COMPANY_CREDIT_NOT_ENOUGH("2007","Insufficient company balance"),
	COMPANY_TYPES_BUSINESS_NULL("2008", "Business type cannot be blank"),
	COMPANY_IS_NOT_EXIST("2009", "Company information does not exist"),
	COMPANY_INDUSTRY_IS_NULL("2010", "Company industry cannot be blank"),
	COMPANY_USER_ROLE_ERROR("2011", "User role information does not match the current company"),
	COMPANY_DELIVERY_MOQ_NEGATIVE("2012", "The initial purchase amount cannot be less than 0"),
	COMPANY_DELIVERY_CHARGE_NEGATIVE("2013", "Delivery fee cannot be less than 0"),
	MAILBOX_HAS_BEEN_REGISTERED("2014", "Mailbox has been registered"),
	NO_ASSOCIATION_BETWEEN_COMPANY_AND_USER("2015", "there is no association between the company and the user "),
	NO_ASSOCIATION_BETWEEN_SUPPLIER_AND_PARTNER("2016", "there is no association between the supplier and the partner"),
	COMPANY_USER_NUM_REACHED_MAXIMUM("2017", "The number of company users has reached the maximum，need change package"),
	COMPANY_STATE_ABNORMAL("2018", "The status of company is abnormal"),

	ALREADY_EXISTS_CATEGORY("3001","The directory already exists"),
	NO_EXISTS_CATEGORY("3002","The parent directory does not exist"),
	NOT_ALLOWED_TO_DELETE("3003","There are subdirectories. Deletion is not allowed"),
	NOT_EXISTS_TO_DELETE("3004","There is no data in the cache and the operation cannot be performed"),

	FILE_UPLOAD_ERROR("4001","File upload failed"),
	FILE_UPLOAD_TOOMANY("4002","Too many documents; Only one is supported!"),
	FILE_PIC_TOOMANY("4003","Too many files in the folder, pause uploading!"),
	FILE_UPLOAD_INDEX_IS_NULL("4004","Multi file upload index cannot be empty"),
	FILE_UPLOAD_TOOMANY_NOUSE("4005","File upload overrun");

    /** 错误码 */
	private String resultCode;

	/** 错误描述 */
	private String resultMsg;

	CommonEnum(String resultCode, String resultMsg) {
		this.resultCode = resultCode;
		this.resultMsg = resultMsg;
	}

	@Override
	public String getResultCode() {
		return resultCode;
	}

	@Override
	public String getResultMsg() {
		return resultMsg;
	}

}
